home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_008 / src / hack.timeout.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  795b  |  33 lines

  1. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */
  2.  
  3. #include    "hack.h"
  4. #define    SIZE(x)    (sizeof(x) / sizeof(x[0]))
  5.  
  6. timeout(){
  7. register struct prop *upp;
  8.     for(upp = u.uprops; upp < u.uprops+SIZE(u.uprops); upp++)
  9.         if((upp->p_flgs & TIMEOUT) && !--upp->p_flgs) {
  10.         if(upp->p_tofn) (*upp->p_tofn)();
  11.         else switch(upp - u.uprops){
  12.         case SICK:
  13.             pline("You die because of food poisoning");
  14.             killer = u.usick_cause;
  15.             done("died");
  16.             /* NOTREACHED */
  17.         case FAST:
  18.             pline("You feel yourself slowing down");
  19.             break;
  20.         case CONFUSION:
  21.             pline("You feel less confused now");
  22.             break;
  23.         case BLIND:
  24.             pline("You can see again");
  25.             setsee();
  26.             break;
  27.         case INVIS:
  28.             on_scr(u.ux,u.uy);
  29.             pline("You are no longer invisible.");
  30.         }
  31.     }
  32. }
  33.